<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>图片所见即所得编辑</title>
  <style>
    html,
    body {
      margin: 0;
      padding: 0;
      height: 100%;
      overflow: hidden;
    }
    #markdown {
      margin-top: 5%;
      width: 70%;
      margin-left: auto;
      margin-right: auto;
    }
  </style>
  <link rel="stylesheet" type="text/css" href="../dist/cherry-markdown.css">
  <link rel="Shortcut Icon" href="./logo/favicon.ico">
  <link rel="Shortcut Icon" href="../logo/favicon.ico">
  <link rel="Bookmark" href="../logo/favicon.ico">
</head>

<body>
  <div id="dom_mask" style="position: absolute; top: 40px; height: 20px; width: 100%;"></div>
  <div id="markdown"></div>
  <script>
    markdownSample = `## 点击预览区的图片来修改图片尺寸
**效果**
标准图片  ![一条dog](images/demo-dog.png)
设置图片大小(相对大小&绝对大小)  ![一条dog#10%#50px](images/demo-dog.png)
设置图片对齐方式：
**左对齐**
![一条dog#auto#100px#left](images/demo-dog.png)
**居中**
![一条dog#auto#100px#center](images/demo-dog.png)
**右对齐**
![一条dog#auto#100px#right](images/demo-dog.png)
**浮动左对齐**
![一条dog#auto#100px#float-left](images/demo-dog.png)
开心也是一天，不开心也是一天
这样就过了两天，汪
**效果**
标准图片  ![一条dog#100px](images/demo-dog.png)
设置图片大小(相对大小&绝对大小)  ![一条dog#10%#50px](images/demo-dog.png)
设置图片对齐方式：
**左对齐**
![一条dog#auto#100px#left](images/demo-dog.png)
**居中**
![一条dog#auto#100px#center](images/demo-dog.png)
**右对齐**
![一条dog#auto#100px#right](images/demo-dog.png)
**浮动左对齐**
![一条dog#auto#100px#float-left](images/demo-dog.png)
开心也是一天，不开心也是一天
这样就过了两天，汪
**效果**
标准图片  ![一条dog#100px](images/demo-dog.png)
设置图片大小(相对大小&绝对大小)  ![一条dog#10%#50px](images/demo-dog.png)
设置图片对齐方式：
**左对齐**
![一条dog#auto#100px#left](images/demo-dog.png)
**居中**
![一条dog#auto#100px#center](images/demo-dog.png)
**右对齐**
![一条dog#auto#100px#right](images/demo-dog.png)
**浮动左对齐**
![一条dog#auto#100px#float-left](images/demo-dog.png)
开心也是一天，不开心也是一天
这样就过了两天，汪

# 例子
> [Github 地址](https://github.com/Tencent/cherry-markdown){target=_blank}

- [basic](index.html){target=_blank}
- [H5](h5.html){target=_blank}
- [多实例](multiple.html){target=_blank}
- [无 toolbar](notoolbar.html){target=_blank}
- [纯预览模式](preview_only.html){target=_blank}
- [注入](xss.html){target=_blank}
- [API](api.html){target=_blank}
- [图片所见即所得编辑尺寸](img.html){target=_blank}
- [标题自动序号](head_num.html){target=_blank}
  `;
  </script>
  <script src="../dist/cherry-markdown.js"></script>
  <script>
    var cherry = new Cherry({
      id: 'markdown',
      toolbars: {
        toolbar: ['bold', 'italic', 'strikethrough', '|', 'header', 'list', 'graph']
      },
      editor: {
        height: '70%'
      },
      value: markdownSample,
    });
  </script>
</body>

</html>
